import request from '@/utils/request'

// 查询关键条款列表
export function listFundTerms(query) {
  return request({
    url: '/terms/fundTerms/list',
    method: 'get',
    params: query
  })
}

// 查询关键条款详细
export function getFundTerms(id) {
  return request({
    url: '/terms/fundTerms/' + id,
    method: 'get'
  })
}

// 保存关键条款
export function saveFundTerms(data) {
  return request({
    url: '/terms/fundTerms/save',
    method: 'post',
    data: data
  })
}

// 删除关键条款
export function delFundTerms(id) {
  return request({
    url: '/terms/fundTerms/' + id,
    method: 'delete'
  })
}

// 导出关键条款
export function exportFundTerms(query) {
  return request({
    url: '/terms/fundTerms/export',
    method: 'get',
    params: query
  })
}

// 根据基金ID获取关键条款信息
export function getFundTermsByFundId(fundId) {
  return request({
    url: '/terms/fundTerms/getFundTermsByFundId',
    method: 'get',
    params: { 'fundId': fundId }
  })
}
